package cz.czu.pef.DataModelling.domainObjects;

import java.util.*;

public class Role extends IdObjectImpl implements IdObject
{
  private static final long serialVersionUID = -4264982939350828002L;

  /*
	 * Entity attributes
	 */
	private RoleType roleType;

	/*
	 * Relations
	 */
	private Set<Employee> employees;

	public Role()
	{
		super();
	}

	public Role(RoleType roleType)
	{
		super();
		this.roleType = roleType;
	}

	public RoleType getRoleType()
	{
		return roleType;
	}

	public void setRoleType(RoleType roleType)
	{
		this.roleType = roleType;
	}

	public Set<Employee> getEmployees()
	{
		return employees;
	}

	public List<Employee> getEmployeesAsList()
	{
		return new ArrayList<Employee>(getEmployees());
	}

	
  public void setEmployees(Set<Employee> employees)
  {
    this.employees = employees;
  }

  public String toString()
	{
		StringBuilder builder = new StringBuilder();
		builder.append("Role [roleType=");
		builder.append(roleType);
		builder.append(", toString()=");
		builder.append(super.toString());
		builder.append("]");
		return builder.toString();
	}
}
